import http from '../http/http'

export const BASE_URL = 'https://ynjiazheng.fzjingzhou.com'

export function setToken(token) {
  uni.setStorageSync('token', token)
}

export function wxLogin(params) {
	return http.post(`/api/user/wxLogin`, params)
}

export function wxSlientLogin(params) {
	return http.post(`/api/user/silent_login`, params)
}

export function initIndex(params) {
	return http.post(`/api/index/index`, params)
}

export function getCategory(params) {
	return http.post(`/api/order/category`, params)
}

export function getGoods(params) {
	return http.post(`/api/order/goods`, params)
}

export function goodsDetail(params) {
	return http.post(`/api/order/detail`, params)
}

export function confirmOrder(params) {
	return http.post(`/api/order/order`, params)
}

export function cancelOrder(params) {
	return http.post(`/api/order/cancel`, params)
}

export function getOrderList(params) {
	return http.post(`/api/order/orderList`, params)
}

export function postAdv(params) {
	return http.post(`/api/order/adv`, params)
}